<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>procman: Procman design overview</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">procman
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Python&#160;API</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Procman design overview </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>This page explains the design of procman and how the different components work together to control processes.</p>
<h1><a class="anchor" id="procman_design_deputies_and_sheriffs"></a>
Deputies and Sheriffs</h1>
<p>There are two types of processes in procman: deputies and sheriffs.</p>
<p><em>Deputies</em> host and control processes directly. A deputy can:</p>
<ul>
<li>start child processes</li>
<li>stop child processes</li>
<li>monitor and report the status of hosted processes</li>
</ul>
<p>The deputy is essentially a daemon process that manages other commands. It is not interactive, does not have a GUI, and simply carries out orders that it receives from a sheriff.</p>
<p><em>Sheriffs</em> tell deputies what to do. A single sheriff can command many deputies. Any process can be a sheriff as long as it implements the sheriff/deputy communications protocol, but the most commonly used sheriff is the <code>bot-procman-sheriff</code> GUI tool provided with Procman. The Procman Python API can also be used to implement a custom sheriff.</p>
<p>Sheriffs and deputies <a class="el" href="procman_comms.html">communicate via LCM</a>, a UDP multicast-based communications protocol. All communications are stateless, which enables sheriffs and deputies to work together more easily in the presence of network and communication dropouts.</p>
<h2><a class="anchor" id="procman_design_bot_procman_sheriff"></a>
bot-procman-sheriff</h2>
<p><code>bot-procman-sheriff</code> is the primary implementation of Procman sheriff, and can be used to communicate with and command deputies. The sheriff forms a global view of all deputies and their commands. The sheriff sends commands to the deputies, and specifies which commands a deputy should be managing, and the desired state of those commands.</p>
<p>The sheriff has an interactive GUI through which a user can modify commands and their desired statuses. It also has a scripting facility that can be useful for starting multiple commands at once, sequencing a startup procedure, or running simple scripts in general.</p>
<p>The sheriff can also be run from the command line without a GUI.</p>
<div class="image">
<img src="procman-sheriff-screenshot.png" alt="procman-sheriff-screenshot.png"/>
<div class="caption">
bot-procman-sheriff screenshot</div></div>
 <h3><a class="anchor" id="procman_design_bot_procman_sheriff_observer_mode"></a>
Observer mode</h3>
<p><code>bot-procman-sheriff</code> can be switched to observer mode, where it stops transmitting commands, and simply displays the state of the deputies. Observer mode is useful in situations where you want to simply observe the state of a running system. Examples of this include situations where the active sheriff is running without a GUI, and also when replaying an LCM log file that contains deputy status message (using the LCM log playback tools). </p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Oct 12 2013 01:18:29 for procman by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3.1
</small></address>
</body>
</html>
